<%inherit file="/base.html"/>

<%def name="main_heading()">${_('Search')}</%def>

<%def name="content()">

<form method="get">
	<table class="form-table">
		<tr>
			<th>${_('Person|Name')}:</th>
			<td><input name="name" type="text" value="${c.name}"/></td>
			<td>${h.select_district(c.district)}</td>
			<td width="10%"><input class="search-button" name="search" type="submit" value="${_('Search')}"/></td>
		</tr>
	</table>
</form>

<div class="paginator">${c.employees.pager()}</div>
<table class="grid-table">
	% for employee in c.employees:
	<tr>
		<td>
			<h3>${h.employee_link(employee)}</h3>
			% if employee.is_employee and employee.division:
			<ul>
			<li><a href="${url(controller='org/district', action='employees', id=employee.division.district_id)}">${employee.division.district}</a></li>
			<li><a href="${url(controller='organization', action='division', id=employee.division_id)}">${employee.division}</a></li>
			<li>${employee.position}</li>
			</ul>
			% else:
			<h5>${_('Dismissed')}</h5>
			% endif
		</td>
	</tr>
	% endfor
</table>
<div class="paginator">${c.employees.pager()}</div>

</%def>